<?php
//http://localhost/1908php3/goodscar.php?userid=23
@require_once("toubu.php");
$userid=$_GET["userid"];
$sql="SELECT * FROM guccicar WHERE userid =$userid";
$result=mysql_query($sql);
$list=array();
$obj=array();
while($data=mysql_fetch_array($result)){
    $list['goodsname']= $data['goodsname'];
    $list['userid']= $data['userid'];
    $list['goodsnum']= $data['goodsnum'];
    $list['goodsimg']= $data['goodsimg'];
    $list['goodsid']= $data['goodsid'];
    $list['goodsprice']= $data['goodsprice'];
    $list['id']= $data['id'];
    $obj[]=$list;
}
echo json_encode($obj);
